As the value and use of information continues to increase, individuals and businesses seek additional ways to process and store information. One option is a computing system. Computing systems may vary in complexity from a single processor operating in relative isolation to large networks of interconnected processors. The interconnected processors may be in close proximity to each other or separated by great distances both physically and as distance is measured in computer networking terms. The interconnected processors may also work together in a closely cooperative fashion or in a loose weakly coupled fashion. Because technology and processing needs and requirements may vary between different applications, the structure and arrangement of the computing system may vary significantly between two different computing systems. The flexibility in computing systems allows them to be configured for both specific users, specific uses, or for more general purposes. Computing system may also include a variety of hardware and software components that may be configured to process, store, and communicate information based on the needs of the users and the applications.
Additionally, some examples of computing systems include non-transient, tangible machine-readable media that include executable code that when run by one or more processors, may cause the one or more processors to perform the steps of methods described herein. Some common forms of machine readable media include, for example, floppy disk, flexible disk, hard disk, magnetic tape, any other magnetic medium, CD-ROM, any other optical medium, punch cards, paper tape, any other physical medium with patterns of holes, RAM, PROM, EPROM, FLASH-EPROM, any other memory chip or cartridge, and/or any other medium from which a processor or computer is adapted to read.
Computing systems are typically used to store, process, and retrieve information and content. Organization and retrieval of the stored information and content is typically constrained by the storage tools and mechanisms used to store the information and content. For example, when files are stored in a block-based file system, such as the Global File System 2 (GFS2), each of the files are typically split up into a number of uniformly-sized blocks. Using blocks is a flexible way of handling files of varying sizes while avoiding the need to store every file using contiguous storage space in the file system. For example, larger files using many data or direct blocks may be stored in blocks at many different locations within the file system. One complication of using blocks is that the file system needs to keep track of all of the data blocks used by each file using pointers. And because small files typically have only a few data blocks and pointers and larger files may have thousands, millions, or even more data blocks and pointers, a flexible tree structure or file tree, stored in its own blocks called indirect blocks, is often used to keep track of the pointers. The top of the file tree is typically stored in a block called an inode. For small files the file tree may only have a height of one with the inode containing data or pointers to data blocks, but for larger files the file tree may have a greater height with the inode containing pointers to indirect blocks, which may in turn include pointers to data blocks or indirect blocks depending upon the height of the file tree. When a size of a file is known before a file is to be stored in the file system, the arrangement of the blocks storing the file tree may be laid out efficiently using consecutive blocks for both the indirect blocks and the data blocks. However, when the size of the file is not known, which may commonly occur, for example, when files are streamed over a network or an audio or video recording is taking place, it is not possible to efficiently lay out the indirect blocks and the data blocks so that delays may occur when the file system later reads files and the indirect blocks and the data blocks are not stored in consecutive blocks within the file system.
Accordingly, it would be desirable to provide improved methods and systems for reading data and indirect blocks of a file when they are not stored in consecutive blocks.